This invention relates to X-ray diffraction systems. X-ray diffraction is a non-destructive technique for the qualitative and quantitative analysis of crystalline material samples, which are generally provided in the form of single crystals. In accordance with this technique, an X-ray beam is generated by an X-ray tube with a stationary anode, by a conventional rotating anode X-ray source or by a synchrotron source and directed toward the material sample under investigation. When the X-rays strike the sample, they are diffracted according to the molecular structure of the sample.
A typical laboratory system 100 for performing single crystal diffraction experiments normally consists of five components as shown in FIG. 1. The components include an X-ray source 102 that produces a primary X-ray beam 104 with the required radiation energy, focal spot size and intensity. X-ray optics 106 are provided to condition the primary X-ray beam 104 to a conditioned, or incident, beam 108 with the required wavelength, beam focus size, beam profile and divergence. A goniometer 110 is used to establish and manipulate geometric relationships between the incident X-ray beam 108, the crystal sample 112 and the X-ray detector 114. The incident X-ray beam 108 strikes the crystal sample 112 and produces diffracted X-rays 116 which are recorded in the detector 114. A sample alignment and monitor assembly comprises a sample illuminator 118 that illuminates the sample 112 and a sample monitor 120, typically a video camera, which generates a video image of the sample to assist users in positioning the sample in the instrument center and monitoring the sample state and position.
The goniometer 110 allows the crystal sample 112 to be rotated around one or more axes. Precise crystallography requires that the sample crystal 112 be aligned to the center of the goniometer 110 and maintained in that center when rotated around the goniometer rotational axes during data collection. During exposure, the sample (a single crystal of the compound of interest) is rotated in the X-ray beam 108 through a precise angular range with a precise angular velocity. The purpose of this rotation is to predictably bring Bragg angle reflections from each atomic plane of the sample into resonance with the incident beam 108 for the same period of time. This recording process produces a set of data, called a “frame”, which at the end of the exposure time is stored in the detector.
Current generation X-ray area detectors used for crystallography, including charge coupled devices (CCDs) and Image Plates, have a finite read out dead time (typically on the order of 1-100 seconds) during which the integrated detector data is read out of the detector and no new data can be acquired. This so called “read out dead time” can significantly decrease the effective collection efficiency of the detector. For example, with modern sources and detectors it is not uncommon to acquire frames with exposure times on the order of one second. With a readout dead time of five seconds, the detector is completely idle (collecting no X-ray intensity data) 80% of the time.
Another deleterious effect of readout dead time is degradation of the data quality due to timing jitter of the mechanical components. During the read out dead time, a shutter (not shown in FIG. 1) in front of the X-ray source 102 is closed to shut off X-ray flux in the X-ray beam 108, the goniometer 110 is stopped and the data from the frame just acquired is read out. After the data is read out, the goniometer 110 is restarted, the shutter is reopened and the next frame of data is acquired. This process requires precise synchronization between the detector 114, the shutter and the goniometer 110. Of course, these mechanical components can only be synchronized with a finite precision and thus timing jitter on the order of 10 msec is typically seen. This timing jitter leads directly to errors in the measured X-ray intensities. For example, for frames acquired with a one second exposure time, a 10 msec jitter leads to a 1-2% error. Thus, timing jitter can be one of the most important error sources in the crystallographic measurement.
This conventional frame-by-frame readout mode is shown schematically in FIG. 2A, which shows the readout of a CCD detector. A CCD detector is comprised of rows of MOS (Metal-Oxide Semiconductor) capacitors. FIG. 2A is a plot 200 that shows the CCD row number on the vertical axis versus time on the horizontal axis. During exposure or integration time 202, all CCD rows acquire data. Then, during readout time 204, each CCD row is sequentially readout until all rows have been readout. The process is then repeated with all CCD rows acquiring data during integration time 206. Depending on the actual detector, readout time 204 could be the same as, or much longer than, integration times 202 and 206. It would obviously be highly advantageous to operate the detector and goniometer in a continuous scan mode wherein the goniometer simply rotates the sample at a constant angular velocity and the detector acquires frames without any readout dead time as this would increase the efficiency of the detector and also essentially eliminate the timing jitter errors. A continuous scan mode is impossible with conventional detectors such as full frame CCDs or Image Plates. However, such a mode is possible with some new types of detectors. CMOS detectors, in particular, have the capability to run continuously with no dead time in either an electronic “global shutter” mode or a “rolling shutter” mode.
In a CMOS detector running in a global shutter mode, at the end of integration, all the pixels in an acquired frame are moved into readout buffers and data in the readout buffers is read out during the acquisition of the next frame. However, detectors running in global shutter mode typically have higher noise and lower quantum efficiency due to the extra transistors required to implement a readout buffer for each pixel.
In contrast, in a rolling shutter mode, the X-ray beam 108 is not shuttered and the goniometer 100 runs continuously. Each pixel in a row is simply readout, in turn, and then reset. That pixel then begins acquiring new data. After the last pixel in a row is readout, the first pixel in the next row is readout, etc. In this case, the entire detector can be readout with no dead time between frames. The rolling shutter mode has the advantage that it is simpler to implement and has lower noise and higher quantum efficiency than the global shutter mode.
However, since the rows are readout sequentially, readout of a row cannot start until all pixels from the prior row have been readout. Consequently, there is a time skew in the readout starting time of each row in a frame. This time skew is equal to the sum of the readout times for each pixel in a row (called the row readout time). This type of operation is illustrated in FIG. 2B, which is a plot 208 that shows the CMOS row number on the vertical axis versus time on the horizontal axis. During data acquisition, each row acquires data during an integration time 210 and reads the data out as indicated by the cumulative row readout time 212. Thus, the next row readout starting time is delayed by this amount of time. Since the first row in a frame cannot be readout until readout of the last row of the frame has completed, after the first row has been readout, there is a delay until the next subsequent readout of that row.
The effect of image skew in a sensor with a rolling shutter read out is well known problem, and there have been a significant number of publications and patents devoted to correcting for these time skew effects. However, the primary focus of the scientific literature and the patent literature is the correction of motion artifacts in a CMOS sensor. That is, when an object moves relative to the camera during a rolling shutter readout the resulting image is distorted due to the time delay effects described above.
For example, an article entitled “Suppressing Rolling Shutter Distortion of CMOS Sensors by Motion Vector detector”, Jung-Bum Chun, H. Jung and C.-M. Kyung IEEE Transactions on Consumer Electronics, v. 54, n. 4, p. 1479 (2008) describes this effect and how the distortion can be detected and corrected using a motion vector approach.
U.S. Patent application No. 2008/0144964 A1 discloses a similar method in which a mathematical model of the motion in an image is constructed and then used to correct for the image distortion caused by a rolling shutter. U.S. Pat. No. 7,720,309 describes detecting similar image elements in adjacent images in rolling shutter video to create a motion matrix which can be used to correct for the “bending” effects caused by a rolling shutter readout. An article entitled “Correcting Rolling-Shutter Distortion of CMOS Sensors using Facial Feature Detection” B. Heflin, W. Scheirer and T. Boult, Fourth IEEE International Conference on Biometrics: Theory Applications and Systems (BTAS), p. 1-6 (September 2010) describes using facial feature recognition to detect and correct for image distortion in facial photos. U.S. Patent Publication No. 2010/0329657 describes the use of a second shutter or a flash, synchronized with the camera readout, to eliminate or reduce the motion skew of a fast moving object when imaged with a rolling shutter.
However, these publications all describe how a rolling shutter distorts the image of a moving object and how this distortion can be corrected. An x-ray diffraction system is fundamentally different. The image in this case does not move at all. Rather, the Bragg refection positions are fixed with respect to the sensor but the intensities of the reflections change with time. None of the image motion correction algorithms described in the literature above addresses this situation.
Other authors have looked at correcting for changes in lighting during a rolling shutter readout. For example, U.S. Pat. No. 7,667,740 describes a method for eliminating modulation effects in CMOS sensors caused by using a rolling shutter in an environment illuminated by lighting with 50 or 60 Hz flicker. This is accomplished by creating a model of the illumination modulation and using this to correct the intensity of each row for the change in illumination. However, this approach is not directly applicable to the case of X-ray diffraction as described above since the X-ray diffraction intensities do not follow a simple repetitive modulation as described by Hofer.
U.S. Pat. No. 7,298,401 discloses a technique where the average row intensity is used to estimate a periodic flicker function which can then be used to correct images collected in an environment with changing ambient illumination. Again, this approach assumes a periodic change in illumination and is thus not applicable to the case of X-ray diffraction as described above.
Similarly, U.S. Patent Publication No. 2010/0039542 describes an imaging sensor which incorporates a separate “flicker sensor” that detects changes in the ambient illumination (such as, again, the 50/60 Hz modulation in fluorescent lights) and uses this to correct for the intensity of the image on a row by row basis. However, in the case of X-ray diffraction, there is no comparable change in the overall signal (rather, it is only the local diffracted signals that change) so this approach is not applicable.
More specifically, in a quantitative application, such as an X-ray diffraction application, it is necessary to precisely compensate for the time skew in the resulting images when using the rolling shutter data acquisition mode. The reason for this compensation is shown schematically in FIGS. 3A and 3B. FIG. 3A shows X-ray data from three Bragg reflections acquired on a conventional X-ray detector using a shutter to block the X-ray beam during readout. Each reflection 300, 302 and 304 is integrated for precisely the same time interval (0-10 seconds in this case) as noted next to the reflection. When data is acquired from the same three reflections with a detector operating in rolling shutter mode, the pattern looks very similar as shown in FIG. 3B with three reflections 306, 308 and 310. The Bragg reflections 306, 308 and 310 do not move with respect to the CMOS detector array (as, for example, would the image of a speeding baseball). In particular, there is no spatial distortion since the positions of the reflections are static with respect to the detector surface. However, each reflection in the image is integrated for a slightly different time interval as noted next to each reflection; this different time interval results in a timing skew.
In order to use diffraction data to determine a molecular structure of a crystal, the intensity and angular rotation range of a large number of Bragg reflections must be precisely determined. In general, the intensity of a given reflection is spread over several pixels (due to the finite size of the crystal, the divergence of the x-ray beam and the finite resolution of the detector). The reflection is also spread over several adjacent frames (due to the finite angular range over which the crystal diffracts, called the “rocking curve” of the crystal).
Accordingly, in order to generate a three-dimensional molecular model, the data must first be “integrated”. The integration process involves converting the series of recorded two-dimensional diffraction patterns or frames, each corresponding to a different crystal orientation, into a three-dimensional model, which in turn involves summing the intensity of a reflection over all the adjacent pixels within a frame and also over all the adjacent frames over which the reflection is spread. This process converts the hundreds of images containing thousands of reflections into a single file. There are a number of techniques for carrying out this integration, but the most powerful is so-called “3D integration”. The process of 3D integration of X-ray diffraction data involves two steps. First, the intensity of a given reflection is determined in several frames. This is accomplished either by simple summation of the intensity in a box centered at the predicted reflection position or by fitting a theoretical or experimental profile function to the reflection intensity. The area under this function then gives the integrated intensity for each reflection in the frame.
The second step involves fitting the resulting reflection intensities from adjacent frames to a function in time (or equivalently, to a function in the scan angle, since the scan angle is directly related to time). In particular, the spots for each reflection are distorted over time by their trajectories in the Ewald sphere, which is a well-known geometric construct that relates the wavevector of the incident and diffracted x-ray beams, the diffraction angle for a given reflection and the reciprocal lattice of the crystal. By fitting the intensity in adjacent frames to a function in time based on the Ewald sphere, it is possible to correct for this distortion and thus yield more accurate integrated intensities.
However, in order to process the data with conventional 3D integration software, all the reflections must be synchronized in time. That is, in order to determine 3D fit of each reflection, the integration routines in the software code make an implicit assumption that all the reflections in a given frame are integrated over the exactly the same time period (and thus the same angular range). As this is not true for data acquired in rolling shutter mode as shown in FIG. 3B, the 3D fit for each reflection will be slightly distorted because the reflection intensities will be fitted to an incorrect function in time.